import request from '@/utils/request'

let orderAfterApi = {
  // 提交售后申请
  saleOrderAfterAdd(data) {
    return request({
      url: '/saleOrderAfter',
      method: 'post',
     data
    })
  },
  // 售后列表
  saleOrderAfterList(params) {
    return request({
      url: '/saleOrderAfter/list',
      method: 'get',
      params
    })
  },
  // 查询售后详情 根据销售订单id
  saleOrderAfterbySaleOrderId(saleOrderId,params) {
    return request({
      url: `/saleOrderAfter/bySaleOrderId/${saleOrderId}`,
      method: 'get',
      params
    })
  },
   // 查询售后详情 根据售后订单id
   saleOrderInfoById(id,params) {
    return request({
      url: `/saleOrderAfter/${id}`,
      method: 'get',
      params
    })
  },
   // 售后订单处理  客服专用
   auditSaleAfterOrder(data) {
    return request({
      url: `/saleOrderAfter/audit`,
      method: 'post',
      data
    })
  },

  // 售后订单打款
  // /saleOrderAfter/remit
  saleOrderAfteRremit(data) {
    return request({
      url: `/saleOrderAfter/remit`,
      method: 'post',
      data
    })
  },
  // 查询销售订单已售后的总金额
  saleOrderAftesumAmount(params) {
    return request({
      url: `/saleOrderAfter/sumAmount`,
      method: 'get',
      params
    })
  },
}

export default orderAfterApi

